<!-- money 页面内容 -->
<section class="money" ng-controller="moneyCtrl">
    <div class="row margin-reset">
    		<div class="row_first col-lg-6 col-md-6 col-sm-12 col-xs-12" >
    			<div class="col-lg-4 col-md-4 col-sm-4  col-xs-12 padding-reset text-center" style="height: 60px;">
	            <h5>{{moneyList.yesterday_income/100 | number:2}}</h5>
	            <h6>昨日收入</h6>
	        </div>
	        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 padding-reset text-center" style="height: 60px;">
	            <h5>{{moneyList.red_count/100 | number:2}}</h5>
	            <h6>昨日红包</h6>
	        </div>
	        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 padding-reset text-center" style="height: 60px;">
		        <h5>{{moneyList.accumulative_count/100 | number:2}}</h5>
		        <h6>累计收入(元)</h6>
		    </div>
        </div>
        <div class="row_first col-lg-6 col-md-6 col-sm-12  col-xs-12">
		    <div class="col-lg-7 col-md-7 col-sm-7 col-xs-12 padding-reset text-center">
			    <h5><i class="glyphicon glyphicon-time" style="color: #58c676;"></i>{{moneyList.pending_count/100 | number:2}}</h5>
			    <h6>未完成订单金额(元)</h6>
			</div>
		    <div class="col-lg-5 col-md-5 col-sm-5 col-xs-12 padding-reset text-center">
		    	<!--user.locked_amount-->
		        <h5><i class="glyphicon glyphicon-tint" style="color: #58c676;"></i>{{ (user.amount + user.security) | moneyint: true }}</h5>
		        <h6>账户余额(元)</h6>
		    </div>
		</div>
    </div>
    <div class="row margin-reset money-head">
	    	<div class="row margin-reset money-infos">
	    		<div class="col-md-4 col-sm-4 col-xs-12 text-center" style="padding-top: 4px;">可提现金额(元):<span>{{ user.amount | moneyint: true }}</span></div>
	    		<div class="col-md-4 col-sm-4 col-xs-12 text-center" style="padding-top: 4px;">保证金金额(元):<span>{{ user.locked_amount | moneyint: true }}</span></div>
	    		<div class="col-md-4 col-sm-4 col-xs-12 text-center" style="padding-top: 4px;">
	            <button type="button" ui-sref="mine.recharge" class="btn btn-default">充值</button>
	            <button type="button" ui-sref="mine.cash" class="btn btn-default">提现</button>
	        </div>
	    	</div>
    </div>
    <div class="row margin-reset content">
        <div class="panel panel-default yf-shadow">
            <div class="panel-heading padding-reset heading row_time">
                <ul class="nav nav-pills" role="tablist" ng-init='moneytype=1'>
                    <li role="presentation" ng-class="{'active': moneytype == 1}" ng-click="monyChange(1);moneytype=1"><a href="">收入<br/><div class="line"></div></a></li>
                    <li role="presentation" ng-class="{'active': moneytype == 2}" ng-click="monyChange(2);moneytype=2"><a href="">支出<br/><div class="line"></div></a></li>
                </ul>
            </div>
            <div class="panel-heading padding-reset heading row_time" style="height: 40px !important;background-color: #F5F5F5;">
           	 	<ul class="nav nav-pills">
                    <li class="col-md-2 col-sm-2 ">时间</li>
                    <li>
	                    	<select  ng-model="moneyObj.timeState" ng-options="times.id as times.name for times in timeItem"  ng-change="timeChange()">
		                </select>
                    </li>
                    <li class="col-md-7 col-sm-7 text-right" ng-click="toMoneyDetail(1);">查看明细>></li>
                </ul>
            </div>
            <div class="panel-heading padding-reset heading" style="height: 450px !important;">
            		<div ng-show="moneyList.line_payments.length==0" style="text-align: center;">暂无数据</div>
            	    <div class="col-md-12 col-sm-12 col-xs-12 text-center" id="lineId" style="height:160px;margin: 10px 0px 0px 0px;"></div>
            		<div class="col-md-12 col-sm-12 col-xs-12 text-center pieStyle" id="pieId" style="height:200px;margin: 20px 0px 0px 0px;"></div>
            </div>
        </div>
    </div>
    <div class="row margin-reset content">
    		<div class="panel panel-default yf-shadow">
    			<div class="panel-heading padding-reset heading row_time" style="border-bottom: 1px solid #E2E2E2 !important;padding: 15px 0px;">
                <div class="col-md-7 col-sm-7 col-xs-7 text-left">提现总额(元)：{{moneyList.encashment_count/100| number:2}}</div>
                <div class="col-md-5 col-sm-5 col-xs-5 text-center" ng-click="toMoneyDetail(2);">查看明细>></div>
            </div>
    			<div class="panel-heading padding-reset heading row_time" style="padding: 15px 0px;">
    				<div class="col-md-7 col-sm-7 col-xs-7 text-left">充值总额(元)：{{moneyList.recharge_count/100| number:2}}</div>
                <div class="col-md-5 col-sm-5 col-xs-5 text-center" ng-click="toMoneyDetail(3);">查看明细>></div>
            </div>
    		</div>
    </div>
</section>
    
    
    <!--<div class="row margin-reset row-income " style="padding: 0px 20px;background-color: #f9f9f9;margin-bottom: 5px;">
        <h5 class="title-income-info" ng-if="user_role == 2">预计可收入总额 <span class="title-income pull-right">￥{{ user.total | moneyint }}</span></h5>
    </div>-->
    <!--<div class="row margin-reset row-income " ng-if="!!user.company_id && user.user_type != 'manager'" style="padding: 0px 20px;background-color: #f9f9f9;margin-bottom: 5px;">
        <div class="col-md-6 col-sm-6">预计提成总金额: <span class="title-income">￥{{ user.sale_commission_count | moneyint:true }}</span></div>
        <div class="col-md-6 col-sm-6 text-right">介绍人提成总金额: <span class="title-income">￥{{ user.intro_commission_count | moneyint:true }}</span></div>
    </div>-->
    <!--<div class="row margin-reset money-head">
        <div class="row margin-reset money-infos">
          <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 padding-reset text-center">
            <h4>昨日收益(元)</h4>
            <h3>
              {{ user.profits[0].price | moneyint: true }}
              <i class="icon-up"></i>
            </h3>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 padding-reset text-center">
            <h4>账户余额(元)</h4>
            <h3>{{ (user.amount + user.locked_amount + user.security) | moneyint: true }}</h3>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 padding-reset text-center">
            <button type="button" ui-sref="mine.recharge" class="btn btn-default">充值</button>
            <button type="button" ui-sref="mine.cash" class="btn btn-default">提现</button>
          </div>
        </div>
        <div class="row margin-reset money-tips" ng-if="user_role == 2">
          <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 text-center">
            <span>可提现金额（元）：{{ user.amount | moneyint: true }}</span>
          </div>
          <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 text-center">
            <span>冻结金额（元）：{{ (user.locked_amount + user.security) | moneyint: true }}</span>
          </div>
        </div>
    </div>
    <div class="row margin-reset content">
        <div class="panel panel-default yf-shadow">
            <div class="panel-heading padding-reset heading">
                <ul class="nav nav-pills" role="tablist" ng-init='moneytype=1'>
                    <li role="presentation" ng-class="{'active': moneytype == 1}" ng-click="getPayments(1);moneytype=1"><a href="">明细<br/><div class="line"></div></a></li>
                    <li role="presentation" ng-class="{'active': moneytype == 2}" ng-click="getPayments(1, 'expense');moneytype=2"><a href="">支出 / 提现<br/><div class="line"></div></a></li>
                    <li role="presentation" ng-class="{'active': moneytype == 3}" ng-click="getPayments(1, 'income');moneytype=3"><a href="">收入 / 充值<br/><div class="line"></div></a></li>
                    <li role="presentation" ng-class="{'active': moneytype == 4}" ng-click="getPayments(1, 'income', true);moneytype=4"><a href="">收益<br/><div class="line"></div></a></li>
                </ul>
            </div>
            <empty data='payments'></empty>
            <table class="table table-striped">
                <tbody>
                    <tr ng-repeat='payment in payments track by $index' ng-click="paypayment(payment);" ng-class="{'moneyhover': payment.trade_status == 'pending' && moneytype != 4}">
                        <td class="col-xs-3 first-td" ng-if="payment.serial_number">
                          <div><a ui-sref="orderDetail({id: payment.order_id})" ng-class="{'active': payment.order_id }">订单：{{payment.serial_number || '/'}}</a></div>
                          <div class="time">{{payment.created_at * 1000 | date: "yyyy-MM-dd HH:mm"}}</div>
                        </td>
                        <td class="col-xs-3" style="padding-left: 30px;text-align: left;" ng-if="!payment.serial_number" ng-bind='payment.created_at * 1000 | date: "yyyy-MM-dd HH:mm"'></td>

                        <td class="col-xs-2" ng-show='moneytype != 4' ng-bind='payment.trade_type == "expense" ? "支出": "收入/充值"'></td>
                        <td class="col-xs-2" ng-show='moneytype != 4' ng-bind='payment.trade_status | paystatus'></td>
                        <td class="col-xs-3" ng-show='moneytype != 4' ng-bind='payment.pay_type | paytype'></td>
                        <td class="col-xs-2" ng-show='moneytype == 4'>&nbsp;</td>
                        <td class="col-xs-2" ng-show='moneytype == 4'>&nbsp;</td>
                        <td class="col-xs-3" ng-show='moneytype == 4'>&nbsp;</td>
                        <td class="col-xs-2">
                            <span class="price">{{ payment.price | moneyint: true }}</span>元
                        </td>
                    </tr>
                </tbody>
            </table>
            <nav ng-show='payments && payments.length >= 0 && paymentspage.total_count > limit'>
                <ul class="pager pager-sm yf-pager">
                    <li>
                        <a class="btn btn-default" ng-disabled="!((paymentspage.current_page - 1) >= 1)" ng-click="getPayments(paymentspage.current_page - 1, trade_type);">上一页</a>
                    </li>
                    <li>
                        <a class="btn btn-default" ng-disabled="!paymentspage.next_page" ng-click="getPayments(paymentspage.next_page, trade_type);">下一页</a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>-->

     <!--<div class="row margin-reset">
        <div class='panel panel-default'>
            <div id='moneyhighchart' width="100%;"></div>
        </div>
    </div> -->

